package com.easytopit.demo.service;

import java.sql.Timestamp;
import java.util.List;

import com.easytopit.demo.domain.Order;
import com.easytopit.demo.domain.enumDomain.OrderStatus;
import com.easytopit.demo.domain.enumDomain.PayStatus;
import com.easytopit.demo.domain.enumDomain.Version;

public interface OrderService {
	
	/**
	 * 获取用户余额
	 * @param name
	 * @return
	 */
	public Double userBalance(String name);
	
	/**
	 * 充值
	 * @param name
	 * @param money
	 */
	public void addMoney(String name,double money);
	
	/**
	 * 增加订单
	 * @param id
	 * @param userName
	 * @param cinema
	 * @param hall
	 * @param movieName
	 * @param movieTime
	 * @param version
	 * @param language
	 * @param info
	 * @param quantity
	 * @param price
	 * @param money
	 * @param createTime
	 * @param endTime
	 * @param orderStatus
	 * @param payStatus
	 */
	public void addOrder(String id,String userName,String cinema,String hall,String movieName,String movieTime,String version,String language,
			String info,Integer quantity,Double price,Double money,String createTime,String endTime,String orderStatus,String payStatus);

	/**
	 * 根据订单号查询订单
	 * @param id
	 * @return
	 */
	public Order queryOrderById(String id);
	
	/**
	 * 退订增加余额
	 * @param name
	 * @param money
	 * @return 
	 */
	public void addBalance(String name,Double money);
	
	/**
	 * 支付订单扣款
	 * @param name
	 * @param money
	 */
	public void reduceBalance(String name,Double money);
	
	/**
	 * 支付
	 * @param num
	 * @param time
	 */
	public boolean payOrder(String num,String time);
	
	/**
	 * 退订
	 * @param num
	 * @param time
	 * @return
	 */
	public boolean refundOrder(String num,String time);
	
	/**
	 * 根据用户名查询订单
	 * @param name
	 * @return
	 */
	public List<Order> queryOrderByName(String name);
	
	/**
	 * 根据条件查询订单
	 * @param id
	 * @param name
	 * @param payStatus
	 * @param createTime
	 * @param endTime
	 * @param cinema
	 * @return
	 */
	public List<Order> searchOrder(String id,String name,String String,String createTime,String endTime,String cinema);
	
	
	
	
	
}